package demo2;

class B {
    public B() {
        func();
    }

    public void func() {
        System.out.println("B::func()....");
    }
}

class C extends B {

    private int num = 1;

    public void func() {
        System.out.println("D::func()...." + num);
    }

}

public class Test {
    public static void main(String[] args) {
        C c = new C();
        c.func();
    }
}
